{extend name="public/layout"}
{block name="title"}我的资料{/block}
{block name="head"}
<style>
    html, body {
        background-color: #f5f5f5;
    }

    .big-icon {
        height: 0.3648rem !important;
        width: 0.3648rem !important;
    }

    .btn-block-area{
        margin-top: 3rem;
    }

</style>
{/block}
{block name="content"}

<div class="list bg-white mtl" id="form1">

    <div class="list-item border-b border-t flex">
        <img src="/images/icons/company.png" alt="" class="big-icon">
        <label for="company">企业名称:</label>
        <div class="flex-con">
            <input type="text" id="company" value="{$m.title}" name="title" required class="form-control" placeholder="请输入企业名称">
        </div>

    </div>
    <div class="list-item border-b flex">
        <img src="/images/icons/faren.png" alt="" class="big-icon">
        <label for="corporation">法人:</label>
        <div class="flex-con">
            <input type="text" id="corporation" value="{$m.corporation}" name="corporation" required class="form-control" placeholder="请输入法人">
        </div>

    </div>
    <div class="list-item border-b flex">
        <img src="/images/icons/zuzhi.png" alt="" class="big-icon">
        <label for="identity">组织机构代码证:</label>
        <div class="flex-con">
            <input type="text" name="identity" value="{$m.identity}" id="identity" required class="form-control" placeholder="请输入组织机构代码证">
        </div>

    </div>
    <div class="list-item border-b flex">
        <img src="/images/icons/man2.png" alt="" class="big-icon">
        <label for="username">联系人姓名:</label>
        <div class="flex-con">
            <input type="text" id="username" value="{$m.username}" name="username" required class="form-control" placeholder="请输入联系人姓名">
        </div>
    </div>
    <div class="list-item border-b flex">
        <img src="/images/icons/phone.png" alt="" class="big-icon">
        <label for="telephone">联系人电话:</label>
        <div class="flex-con">
            <input type="text" id="telephone" name="telephone" value="{$m.telephone}"
                   required class="form-control" placeholder="请输入联系人电话">
        </div>
    </div>

</div>
<div class="btn-area btn-block-area">
    <div class="btn-block btn-primary btn-rounded" id="saveBtn">提交审核</div>
</div>

{:_js('js/phone.js')}
<script>
    $('#saveBtn').on('click', function () {
        c.form('form1', "{:U('saveCompanyInfo')}").validate().submit().success(function () {
            ui.tip.show('提交成功,请等待审核，谢谢');
            setTimeout(function () {
                location.href = "{:U('index/mine')}";
            },1500);
        });
    });
</script>
{/block}